/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bumblebee.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author numessi
 */
@Entity
@Table(name = "Room")
@NamedQueries({
    @NamedQuery(name = "Room.findAll", query = "SELECT r FROM Room r"),
    @NamedQuery(name = "Room.findByRoomId", query = "SELECT r FROM Room r WHERE r.roomId = :roomId"),
    @NamedQuery(name = "Room.findByRoomType", query = "SELECT r FROM Room r WHERE r.roomType = :roomType"),
    @NamedQuery(name = "Room.findByRoomPricePerDay", query = "SELECT r FROM Room r WHERE r.roomPricePerDay = :roomPricePerDay"),
    @NamedQuery(name = "Room.findByRoomStatus", query = "SELECT r FROM Room r WHERE r.roomStatus = :roomStatus"),
    @NamedQuery(name = "Room.findByRoomNumber", query = "SELECT r FROM Room r WHERE r.roomNumber = :roomNumber"),
    @NamedQuery(name = "Room.findByRoomLocation", query = "SELECT r FROM Room r WHERE r.roomLocation = :roomLocation")})
public class Room implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "room_id")
    private Short roomId;
    @Column(name = "room_type")
    private String roomType;
    @Column(name = "room_price_per_day")
    private Double roomPricePerDay;
    @Basic(optional = false)
    @Column(name = "room_status")
    private boolean roomStatus;
    @Basic(optional = false)
    @Column(name = "room_number")
    private int roomNumber;
    @Basic(optional = false)
    @Column(name = "room_location")
    private String roomLocation;

    public Room() {
    }

    public Room(Short roomId) {
        this.roomId = roomId;
    }

    public Room(Short roomId, boolean roomStatus, int roomNumber, String roomLocation) {
        this.roomId = roomId;
        this.roomStatus = roomStatus;
        this.roomNumber = roomNumber;
        this.roomLocation = roomLocation;
    }

    public Short getRoomId() {
        return roomId;
    }

    public void setRoomId(Short roomId) {
        this.roomId = roomId;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public Double getRoomPricePerDay() {
        return roomPricePerDay;
    }

    public void setRoomPricePerDay(Double roomPricePerDay) {
        this.roomPricePerDay = roomPricePerDay;
    }

    public boolean getRoomStatus() {
        return roomStatus;
    }

    public void setRoomStatus(boolean roomStatus) {
        this.roomStatus = roomStatus;
    }

    public int getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(int roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getRoomLocation() {
        return roomLocation;
    }

    public void setRoomLocation(String roomLocation) {
        this.roomLocation = roomLocation;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (roomId != null ? roomId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Room)) {
            return false;
        }
        Room other = (Room) object;
        if ((this.roomId == null && other.roomId != null) || (this.roomId != null && !this.roomId.equals(other.roomId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bumblebee.entities.Room[roomId=" + roomId + "]";
    }

}
